<template>
  <div>
    <swiper :interval="interval" indicator-dots="true" circular='true' :duration="duration">
      <block v-for="(item,index) in realList" :key="index">
        <swiper-item>
          <img :src="item"  class="slide-image" style="heigth:100%;">
          <!-- <image  :src="item" class="slide-image" width="355" height="150"> -->
        </swiper-item>
      </block>
    </swiper>
  </div>
</template>

<script>
import api from "@/utils/api";

export default {
  props:{
    imgList:Array

  },
  data() {
    return {
      imgUrls: [
        "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg",
        "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg",
        "http://img95.699pic.com/photo/50014/9862.jpg_wh300.jpg"
      ],
      indicatorDots: false,
      autoplay: false,
      interval: 5000,
      duration: 1000,
      imgArr:[]
    };
  },
  async mounted() {
  },
  methods: {
    // getImgs() {
    //   let option = {
    //     orderId: "201812713928"
    //   };
    //   api
    //     .orderImages(option)
    //     .then(res => {
    //       console.log("option", res);
    //     })
    //     .catch(err => {
    //       console.log("err", err);
    //     });
    // }
  },
  computed: {
    realList(){
      // if(this.imgList.length>0){
      //   return this.imgList
      // }else{
      //   return this.imgUrls
      // }
        return this.imgList
    }
  }
};
</script>

<style scoped>
.slide-image{
  height: 100%;;
  width: 100%;
}
</style>
